package org.example.design.adapter.itf.impl;

import org.example.design.adapter.itf.OrderAdapterService;
import org.example.design.adapter.service.OrderService;

/**
 * @Classname InsideOrderService
 * @Description 内部接口适配类
 * @Date 2020/11/3 11:55 上午
 * @Created by xiangjd
 */
public class InsideOrderService implements OrderAdapterService {

    private OrderService orderService = new OrderService();

    @Override
    public boolean ifFirst(String uid) {
        Long useOrderCount = orderService.findUseOrderCount(uid);
        if (useOrderCount >= 1) {
            return false;
        }
        return true;
    }
}
